package leetcode.code0123;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution123 implements IDebug {

	public abstract int maxProfit(int[] prices);

	@Override
	public void debug1() {
		int[] prices = HelpDebug.str2array3("[3,3,5,0,0,3,1,4]");
		int r = this.maxProfit(prices);
		HelpDebug.compare(6, r);
	}

	@Override
	public void debug2() {
		int[] prices = HelpDebug.str2array3("[1,2,3,4,5]");
		int r = this.maxProfit(prices);
		HelpDebug.compare(4, r);
	}

	@Override
	public void debug3() {
		int[] prices = HelpDebug.str2array3("[7,6,4,3,1]");
		int r = this.maxProfit(prices);
		HelpDebug.compare(0, r);
	}

	@Override
	public void debug4() {
		int[] prices = HelpDebug.str2array3("[1]");
		int r = this.maxProfit(prices);
		HelpDebug.compare(0, r);
	}

}
